<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
<head>
  <meta charset="utf-8">
  <title>模板那管理</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link rel="stylesheet" type="text/css" href="/Public/admin/layui/css/layui.css" media="all">
  <link rel="stylesheet" type="text/css" href="/Public/admin/bootstrap/css/bootstrap.css" media="all">
  <link rel="stylesheet" type="text/css" href="/Public/admin/global.css" media="all">
  <link rel="stylesheet" type="text/css" href="/Public/admin/css/personal.css" media="all">
</head>
<body>

<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
  <ul class="layui-tab-title">
    <li class="layui-this"> PC默认模板</li>
   <li>手机默认模板</li>
  </ul>
  <div class="layui-tab-content">
    <div class="layui-tab-item layui-show">
      <a href="/admin/template/add/flag/1"><div class="layui-btn">新建模板[列表页]</div></a>
      <a href="/admin/template/add/flag/2"><div class="layui-btn layui-btn-normal">新建模板[内容页]</div></a>
      <a href="/admin/template/add/flag/3"><div class="layui-btn layui-btn-warm">新建模板[栏目页]</div></a>
      <a href="/admin/template/add/flag/4"><div class="layui-btn">新建模板[单页]</div></a>
      <a href="/admin/template/add/flag/5"><div class="layui-btn layui-btn-danger">新建模板[公共]</div></a>
      <a href="/admin/template/add/flag/6"><div class="layui-btn layui-btn-primary">新建模板[其他]</div></a>
      <table class="layui-table">
          <colgroup>
            <col width="100">
            <col>
          </colgroup>
          <thead>
            <tr>
              <th>名称</th>
              <th>标题</th>
              <th>可写</th>
              <th>发布时间</th>
              <th>操作</th>
            </tr>
          </thead>
          <tbody>
            <?php if(is_array($files)): $i = 0; $__LIST__ = $files;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$list): $mod = ($i % 2 );++$i;?><tr>
              <td><?php echo ($list['name']); ?></td>
              <td><?php echo ($pc_fields[$list['name']]); ?></td>
              <td><?php echo ($list['write']==true?'可写':'不可写'); ?></td>
              <td><?php echo (date("Y-m-d H:i:s",$list['mtime'])); ?></td>
              <td align="center">
                <?php if($list['write'] == true): ?><a href="/admin/template/edit/fname/<?php echo ($list['bname']); ?>" class="layui-btn layui-btn-small layui-btn-danger">编辑</a><?php endif; ?>
                <a href="/admin/template/del/fname/<?php echo ($list['bname']); ?>" class="layui-btn layui-btn-small">删除</a>
              </td>
            </tr><?php endforeach; endif; else: echo "" ;endif; ?>
          </tbody>
        </table>
    </div>
    <div class="layui-tab-item">
      <a href="/admin/template/add/flag/1/type/2"><div class="layui-btn layui-btn-radius">新建模板[列表页]</div></a>
      <a href="/admin/template/add/flag/2/type/2"><div class="layui-btn layui-btn-radius layui-btn-normal">新建模板[内容页]</div></a>
      <a href="/admin/template/add/flag/3/type/2"><div class="layui-btn layui-btn-radius layui-btn-warm">新建模板[栏目页]</div></a>
      <a href="/admin/template/add/flag/4/type/2"><div class="layui-btn layui-btn-radius">新建模板[单页]</div></a>
      <a href="/admin/template/add/flag/5/type/2"><div class="layui-btn layui-btn-radius layui-btn-danger">新建模板[公共页]</div></a>
      <a href="/admin/template/add/flag/6/type/2"><div class="layui-btn layui-btn-radius layui-btn-primary">新建模板[其他]</div></a>
       <table class="layui-table">
          <colgroup>
            <col width="100">
            <col>
          </colgroup>
          <thead>
            <tr>
              <th>名称</th>
              <th>标题</th>
              <th>可写</th>
              <th>发布时间</th>
              <th>操作</th>
            </tr>
          </thead>
          <tbody>
            <?php if(is_array($mfiles)): $i = 0; $__LIST__ = $mfiles;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$list): $mod = ($i % 2 );++$i;?><tr>
              <td><?php echo ($list['name']); ?></td>
              <td><?php echo ($m_fields[$list['name']]); ?></td>
              <td><?php echo ($list['write']==true?'可写':'不可写'); ?></td>
              <td><?php echo (date("Y-m-d H:i:s",$list['mtime'])); ?></td>
              <td align="center">
                  <?php if($list['write'] == true): ?><a href="/admin/template/edit/fname/<?php echo ($list['bname']); ?>/type/2" class="layui-btn layui-btn-small layui-btn-danger">编辑</a><?php endif; ?>
                  <a href="/admin/template/del/fname/<?php echo ($list['bname']); ?>/type/2" class="layui-btn layui-btn-small">删除</a>
              </td>
            </tr><?php endforeach; endif; else: echo "" ;endif; ?>
          </tbody>
        </table>
    </div>
    </div>
  </div>
</div> 
<script src="/Public/admin/layui/layui.js" charset="utf-8"></script>
<script>
layui.use('element', function(){
  var $ = layui.jquery
  ,element = layui.element(); //Tab的切换功能，切换事件监听等，需要依赖element模块
});
layui.use('form', function(){
  var form = layui.form();
  });
</script>
</body>
</html>